﻿using System;
using System.IO;

namespace LabSolutions
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = null;
            using (StreamReader sr = new StreamReader("input.txt"))
            {
                input = sr.ReadToEnd();
            }
            string[] inputNumbers = input.Split(' ');
            double a = double.Parse(inputNumbers[0]);
            double b = double.Parse(inputNumbers[1]);
            double z1 = Math.Pow(Math.Cos(a) - Math.Cos(b), 2) - Math.Pow(Math.Sin(a) - Math.Sin(b), 2);
            double z2 = -4 * Math.Pow(Math.Sin((a - b) / 2), 2) * Math.Cos(a + b);
            using (StreamWriter sw = new StreamWriter("output.txt"))
            {
                sw.WriteLine(z1.ToString("0.00000"));
                sw.Write(z2.ToString("0.00000"));
            }            
        }
    }
}
